﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WCFServiceWebRole1
{
    public partial class Bidding : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Service1 svc = new Service1();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            string bidding1 = TextBox1.Text;
            try
            {
                double biddingD1 = Convert.ToDouble(bidding1);
                biddingD1 = Math.Round(biddingD1, 1);
                TextBox1.Text = "";
                if (biddingD1 < 0 || biddingD1 > 100)
                {

                }
                else
                {
                    Service1 svc = new Service1();
                    //svc.PlaceBid(biddingD1, 1);
                    Label1.Text = "-" + biddingD1.ToString() + "%";
                }
            }
            catch (Exception) { }
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            string bidding2 = TextBox2.Text;
            try
            {
                double biddingD2 = Convert.ToDouble(bidding2);
                biddingD2 = Math.Round(biddingD2, 1);
                TextBox2.Text = "";
                if (biddingD2 < 0 || biddingD2 > 100)
                {

                }
                else
                {
                    Service1 svc = new Service1();
                    //svc.PlaceBid(biddingD1, 1);
                    Label2.Text = "-" + biddingD2.ToString() + "%";
                }
            }
            catch (Exception) { }
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            string bidding3 = TextBox3.Text;
            try
            {
                double biddingD3 = Convert.ToDouble(bidding3);
                biddingD3 = Math.Round(biddingD3, 1);
                TextBox3.Text = "";
                if (biddingD3 < 0 || biddingD3 > 100)
                {

                }
                else
                {
                    Service1 svc = new Service1();
                    //svc.PlaceBid(biddingD1, 1);
                    Label3.Text = "-" + biddingD3.ToString() + "%";
                }
            }
            catch (Exception) { }
        }
    }
}